package makabakaquestionnaire.zutsoftware.service.impl;

import makabakaquestionnaire.zutsoftware.entity.ProjectTemplateCategory;
import makabakaquestionnaire.zutsoftware.mapper.ProjectTemplateCategoryMapper;
import makabakaquestionnaire.zutsoftware.service.IProjectTemplateCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 模板目录Service业务层处理
 * 
 * @author wjf
 * @date 2022-03-23
 */
@Service
public class ProjectTemplateCategoryServiceImpl implements IProjectTemplateCategoryService
{
    @Autowired
    private ProjectTemplateCategoryMapper projectTemplateCategoryMapper;

    /**
     * 查询模板目录
     * 
     * @param id 模板目录主键
     * @return 模板目录
     */
    @Override
    public ProjectTemplateCategory selectProjectTemplateCategoryById(Long id)
    {
        return projectTemplateCategoryMapper.selectProjectTemplateCategoryById(id);
    }

    /**
     * 查询模板目录列表
     * 
     * @param projectTemplateCategory 模板目录
     * @return 模板目录
     */
    @Override
    public List<ProjectTemplateCategory> selectProjectTemplateCategoryList(ProjectTemplateCategory projectTemplateCategory)
    {
        return projectTemplateCategoryMapper.selectProjectTemplateCategoryList(projectTemplateCategory);
    }

    /**
     * 新增模板目录
     * 
     * @param projectTemplateCategory 模板目录
     * @return 结果
     */
    @Override
    public int insertProjectTemplateCategory(ProjectTemplateCategory projectTemplateCategory)
    {
        return projectTemplateCategoryMapper.insertProjectTemplateCategory(projectTemplateCategory);
    }

    /**
     * 修改模板目录
     * 
     * @param projectTemplateCategory 模板目录
     * @return 结果
     */
    @Override
    public int updateProjectTemplateCategory(ProjectTemplateCategory projectTemplateCategory)
    {
        return projectTemplateCategoryMapper.updateProjectTemplateCategory(projectTemplateCategory);
    }

    /**
     * 批量删除模板目录
     * 
     * @param ids 需要删除的模板目录主键
     * @return 结果
     */
    @Override
    public int deleteProjectTemplateCategoryByIds(Long[] ids)
    {
        return projectTemplateCategoryMapper.deleteProjectTemplateCategoryByIds(ids);
    }

    /**
     * 删除模板目录信息
     * 
     * @param id 模板目录主键
     * @return 结果
     */
    @Override
    public int deleteProjectTemplateCategoryById(Long id)
    {
        return projectTemplateCategoryMapper.deleteProjectTemplateCategoryById(id);
    }
}